import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import Avue from '@smallwei/avue'
import '@smallwei/avue/lib/index.css'
import { createPinia } from 'pinia'
import router from './router'
import './assets/styles/variables.css'
import './assets/styles/global.css'
import App from './App.vue'
import { useLoginStore } from './store/loginStore'

const app = createApp(App)
const pinia = createPinia()

app.use(ElementPlus)
app.use(Avue)
app.use(pinia)
app.use(router)

const loginStore = useLoginStore()
loginStore.loadFromStorage()

app.mount('#app')
